package com.ophiux.system.api.feign;

import com.ophiux.common.core.base.Result;
import com.ophiux.common.core.constant.ServiceNameConstants;
import com.ophiux.system.model.entity.SysLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @desc: 日志服务
 * @author: hhl
 * @date：2022/7/18 16:25
 */
@FeignClient(contextId = "sysLogFeignApi", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface SysLogFeignApi {
    /**
     * 保存系统日志
     *
     * @param sysLog 日志实体
     * @return 结果
     */
    @PostMapping("/sysLog/saveLog")
    public Result saveLog(@RequestBody SysLog sysLog);

    @GetMapping("/sysLog/getCountLog")
    Result getCountLog();
}
